<div class="c-side-bar">
  <a class="c-side-bar__title c1 fs6" href="/articles?a=<%= $.alias %>">
    <%= $.alias === 'news' ? '重阳画映' : '联系我们' %>
  </a>
  <ul class="cc-menu">
    <% $.categories.forEach(function (item) { %>
    <li class="cc-menu__item">
      <%
        var className = ''

        if ($.details) {
          if ($.details.category_id === item.id) {
            className = ' class="is-active"'
          }
        } else if ($.category) {
          if ($.category.id === item.id) {
            className = ' class="is-active"'
          }
        }
      %>
      <a<%- className %> href="/articles?a=<%= $.alias %>&c=<%= item.id %>"><%= item.title %></a>
    </li>
    <% }) %>
  </ul>
</div>
